<?php
//后台路由�
$admin = array(
    'namespace' => 'Admin',
    'middleware' => ['web']
);

Route::group($admin, function () {
    // 登录
    Route::controller('login', 'Login' . CTR);

    Route::get('center', 'LoginController@getIndex');

    Route::group(['prefix' => 'center', 'middleware' => 'checkAdminlogin'], function () {
        /**
         * 隐式控制器路由组
         */
        Route::controllers([
            'index' => 'Index' . CTR,
            'admin' => 'Admin' . CTR,
            'action' => 'Action' . CTR,
            'article' => 'Article' . CTR,
            'auth' => 'Auth' . CTR,
            'config' => 'Config' . CTR,
            'menu' => 'Menu' . CTR,
            'database' => 'Database' . CTR,  //数据备份还原
        ]);
    });


//    //数据备份还原
//    Route::get('database/index/{type}','DatabaseController@getIndex');
//    Route::any('database/optimize','DatabaseController@anyOptimize');
//    Route::any('database/repair','DatabaseController@anyRepair');
//    Route::get('database/del/{time?}','DatabaseController@getDel');
//    Route::get('database/export','DatabaseController@getExport');
//    Route::post('database/export','DatabaseController@postExport');
//    Route::get('database/import','DatabaseController@getImport');


});